home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / pascal / flxkey.exe / FLXKEY.DEF < prev    next >
Text File  |  1993-02-21  |  3KB  |  83 lines

  1.  
  2. (**********************************************************************)
  3. (*                                                                    *)
  4. (*        FLXKEY UNIT 1.10 COPYRIGHT (c) 1993, GUY MCLOUGHLIN         *)
  5. (*                                                                    *)
  6. (*     Shareware unit to create encrypted registration-key files.     *)
  7. (*                                                                    *)
  8. (*         Supports Turbo Pascal 4.0, 5.0, 5.5, 6.0, and 7.0          *)
  9. (**********************************************************************)
  10.  
  11. {$IFDEF VER40}
  12.   {$B-,D-,F+,I-,L-,N-,R-,S+,V+}
  13. {$ENDIF}
  14.  
  15. {$IFDEF VER50}
  16.   {$A+,B-,D-,E-,F+,I-,L-,N-,O+,R-,S+,V+}
  17. {$ENDIF}
  18.  
  19. {$IFDEF VER55}
  20.   {$A+,B-,D-,E-,F+,I-,L-,N-,O+,R-,S+,V+}
  21. {$ENDIF}
  22.  
  23. {$IFDEF VER60}
  24.   {$A+,B-,D-,E-,F+,G-,I-,L-,N-,O+,R-,S+,V+,X-}
  25. {$ENDIF}
  26.  
  27. {$IFDEF VER70}
  28.   {$A+,B-,D-,E-,F+,G-,I-,L-,N-,O+,P-,Q-,R-,S+,T-,V+,X-}
  29. {$ENDIF}
  30.  
  31. unit FlxKey;
  32.  
  33. interface
  34.  
  35.               (* Type definitions.                                    *)
  36. type
  37.   st_20  = string[20];
  38.   st_30  = string[30];
  39.   st_79  = string[79];
  40.   st_100 = string[100];
  41.   st_254 = string[254];
  42.  
  43.               (* FLX record definition.                               *)
  44.   rc_Flx = record
  45.              FirstName : st_20;
  46.              LastName  : st_30;
  47.              Address1  : st_30;
  48.              Address2  : st_30;
  49.              Address3  : st_30;
  50.              AppName   : st_20;
  51.              Version   : word;
  52.              Serial    : longint;
  53.              Date      : longint;
  54.              Access    : word;
  55.              MiscData  : st_254
  56.            end;
  57.  
  58.  
  59.   (***** Create encrypted registration-key file using INrec data,     *)
  60.   (*     Ecode1 and Ecode2 encryption-codes, and the OUTname filname  *)
  61.   (*     path.                                                        *)
  62.   (*                                                                  *)
  63.   procedure CreateFlxKey({ input}     INrec   : rc_Flx;
  64.                                       Ecode1  : st_100;
  65.                                       Ecode2  : st_100;
  66.                                       OUTname : st_79;
  67.                          {update} var Error   : word);
  68.  
  69.  
  70.   (***** Check and decode registration-key file called INname, use    *)
  71.   (*     Ecode1 and Ecode2 to decrypt this file. Decrypted data will  *)
  72.   (*     be placed in OUTrec record, and the DaysOld variable will be *)
  73.   (*     set to indicate the age of the registration key-file.        *)
  74.   (*                                                                  *)
  75.   procedure ReadFlxKey({ input}     Ecode1  : st_100;
  76.                                     Ecode2  : st_100;
  77.                                     INname  : st_79;
  78.                        {update} var OUTrec  : rc_Flx;
  79.                                 var DaysOld : word;
  80.                                 var Error   : word);
  81.  
  82.  
  83.